@(qcmForm: Form[Qcm], qcm: Qcm)
@import helper._


@main("Creation QCM step 2/3 : Associer les questions aux QCM"){
@helper.form(action = routes.CreateQCM.submit(3)) {
<fieldset>
		<legend>Initialisation :</legend>
		<br/>
		<div>
					<h5>Libell&eacute : </h5> @qcmForm("libelle").value
					<h5>Date Ouverture :</h5> @qcm.getDateOuverture().format("dd/MM/yyyy HH:mm")
					<h5>Date Cloture : </h5> @qcm.getDateCloture().format("dd/MM/yyyy HH:mm")
					<p></p>
				</div>

			<legend>Liste des questions</legend>
			<br/>
						<table border ="1">
							<tr>
								<th>Libell&eacute </th>
								<th>Niveau de difficult&eacute </th>
							</tr>
							@for(question <- qcm.getListeQuestions()){
							<tr>
							<td>@question.getLibelleQuestion()</td>
							<td>@question.getNiveauQuestion().getLibelleNiveau() </td>
							</tr>
							}
						</table>
						<br/>
						
			<legend>Notation : </legend>
				<p>Il existe 4 niveaux de difficult&eacutes.
				<br/>Indiquer pour chaque cat&eacutegorie le nombre de point (positif ou negatif)que vous voulez attribuer:</p>
					<ul>
							<li>Facile</li>
							<table>
							<tr>
								<td>Point Positif</td>
								<td>Point N&eacutegatif</td>
							</tr>
							<tr>
								<td><input type="text" name="ppf" id="ppf"></td>
								<td><input type="text" name ="pnf"id="pnf"></td>
							</tr>
							
							</table>
	
							<li>Medium</li>
							<table>
							<tr>
								<td>Point Positif</td>
								<td>Point N&eacutegatif</td>
							</tr>
							<tr>
								<td><input type="text" name="ppm" id="ppm"></td>
								<td><input type="text" name="pnm" id="pnm"></td>
							</tr>
							</table>
							
							<li>Difficile</li>
							<table>
							<tr>
								<td>Point Positif</td>
								<td>Point N&eacutegatif</td>
							</tr>
							<tr>
								<td><input type="text" name="ppd" id="ppd"></td>
								<td><input type="text" name="pnd" id="pnd"></td>
							</tr>
							
							</table>
							<li>Bonus</li>
							<table>
							<tr>
								<td>Point Positif</td>
								<td>Point N&eacutegatif</td>
							</tr>
							<tr>
								<td><input type="text" name="ppb" id="ppb"></td>
								<td><input type="text" name="pnb" id="pnb"></td>
							</tr>
							</table>
						</ul>

</fieldset>
		<input type="hidden" name="libelle" value="@qcmForm("libelle").valueOr("")">
		<input type="hidden" name="dateOuverture" value="@qcm.getDateOuverture().format("dd/MM/yyyy HH:mm")">
		<input type="hidden" name="dateCloture" value="@qcm.getDateCloture().format("dd/MM/yyyy HH:mm")">   
		
</br>            
 <div class="actions"> 	
     	<button id="action" type="submit" name="action" value="retour" class="btn btn-primary">
			Retour <i class="icon-white icon-circle-arrow-left"></i> 
		</button>
		
       	<button id="action" type="submit" name="action" value="valider"class="btn btn-primary">
			Valider <i class="icon-white icon-circle-arrow-right"></i>
		</button>
</div>
}
}
